package com.game.gameshoppingcenter.dao;

import com.game.gameshoppingcenter.entities.Admin;
import com.game.gameshoppingcenter.entities.User;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface AdminRepository extends CrudRepository<Admin,Long> {
    List<Admin> findAll();
    @Query(nativeQuery = true,value = "select * from admin where name=?1 and password=?2")
    Admin login (String name,String password);

